// export const BASE_URL = "https://api.huoxingy.com/";

// 根据环境来选择api地址
let baseUrl = window.location.hostname;
let BASE_URL_FOR_API = "";
let BASE_URL_FOR_STOCK = "";
console.log(baseUrl)
switch (baseUrl) {
    case "localhost":
        BASE_URL_FOR_API = 'https://staging-sales-api.huoxingy.com/';
        BASE_URL_FOR_STOCK = "https://staging-api.huoxingy.com/"
        break;
    case "192.168.0.105":
        BASE_URL_FOR_API = 'https://staging-sales-api.huoxingy.com/';
        BASE_URL_FOR_STOCK = "https://staging-api.huoxingy.com/"
        break;
    case "staging-sales.huoxingy.com":
        BASE_URL_FOR_API = 'https://staging-sales-api.huoxingy.com/';
        BASE_URL_FOR_STOCK = "https://staging-api.huoxingy.com/"
        break;
    case "prod-test-sales.huoxingy.com":
        BASE_URL_FOR_API = 'https://prod-test-sales-api.huoxingy.com/';
        BASE_URL_FOR_STOCK = "https://prod-test-api.huoxingy.com/"
        break;
    default:
        BASE_URL_FOR_API = 'https://sales-api.huoxingy.com/';
        BASE_URL_FOR_STOCK = "https://prod-api.huoxingy.com/"
        break;
}
//
export const BASE_URL = BASE_URL_FOR_STOCK;
// export const BASE_URL = "https://api.huoxingy.com/";
export const API_BASE_URL = BASE_URL_FOR_API;
